add_llvm_component_group(Fe)

set(LLVM_TARGET_DEFINITIONS Fe.td)

tablegen(LLVM FeGenAsmWriter.inc -gen-asm-writer)
tablegen(LLVM FeGenDAGISel.inc  -gen-dag-isel)
tablegen(LLVM FeGenCallingConv.inc -gen-callingconv)
tablegen(LLVM FeGenInstrInfo.inc -gen-instr-info)
tablegen(LLVM FeGenRegisterInfo.inc -gen-register-info)
tablegen(LLVM FeGenSubtargetInfo.inc -gen-subtarget)
tablegen(LLVM FeGenMCPseudoLowering.inc -gen-pseudo-lowering)

add_public_tablegen_target(FeCommonTableGen)

add_llvm_target(FeCodeGen
        FeTargetMachine.cpp
        FeInstrInfo.cpp
        FeRegisterInfo.cpp
        FeSubtarget.cpp
        FeFrameLowering.cpp
        FeISelLowering.cpp
        FeISelDAGToDAG.cpp
        FeAsmPrinter.cpp
        FeDataCtrl.cpp

        LINK_COMPONENTS
        AsmPrinter
        CodeGen
        CodeGenTypes
        Core
        MC
        SelectionDAG
        FeDesc
        FeInfo
        Support
        Target
        TargetParser
        ADD_TO_COMPONENT
        Fe
)

add_subdirectory(MCTargetDesc)
add_subdirectory(TargetInfo)